function s_config = do_config(setup_dir)
%function s_config = do_config(setup_dir)
% s_config = struct(...
%             'batim_contour_scale', batim_contour_scale, ...
%             'coastline_file', coastline_file, ...
%             'save_coastline', save_coastline, ...
%             'coastline_res', coastline_res, ...
%             'coastline_patch_color', coastline_patch_color, ...
%             'plot_color', plot_color, ...
%             'colorlimits', colorlimits, ...
%             'scalecolor', scalecolor, ...
%             'colormap_type', colormap_type, ...
%             'colormap_inv', colormap_inv, ...
%             'shading_type', shading_type, ...
%             'autocolortitle', autocolortitle, ...
%             'colorbartitle', colorbartitle,...
%             'plot_contour', plot_contour, ...
%             'contourlimits', contourlimits, ...
%             'autoscale', autoscale, ...
%             'contour_scale', contour_scale, ...
%             'contour_line_style', contour_line_style, ...
%             'contour_colormap_type', contour_colormap_type, ...
%             'filetype', filetype, ...
%             'matfile', matfile, ...
%             'matdims', matdims, ...
%             'file', file, ...
%             'projection', projection, ...
%             'grid_fontsize', grid_fontsize, ...
%             'title_fontsize', title_fontsize, ...
%             'override_ll', override_ll, ...
%             'lat_lon_override_file', lat_lon_override_file, ...
%             'closematlab', closematlab, ...
%             'change_miss', change_miss, ...
%             'new_miss', new_miss, ...
%             'output_format', output_format, ...
%             'output_extension', output_extension, ...
%             'output_dir', output_dir, ...
%             'output_visible', output_visible, ...
%             'horizontal_scale_x', horizontal_scale_x, ...
%             'horizontal_scale_y', horizontal_scale_y, ...
%             'horizontal_scale_size', horizontal_scale_size, ...
%             'plot_vectors', plot_vectors, ...
%             'u_vec', u_vec, ...
%             'v_vec', v_vec, ...
%             'inc', inc, ...
%             'legpos', legpos, ...
%             'legcol', legcol, ...
%             'legscale', legscale, ...
%             'legkey', legkey, ...
%             'vec_headlength', vec_headlength, ...
%             'vec_headwidth', vec_headwidth, ...
%             'vec_shaftwidth', vec_shaftwidth );

wd = cd;
cd(setup_dir);

disp('Loading user defined config')

%Get default configuration input
config_netcdf;
config_batim;
config_coastline;
config_scale;
config_global;
config_output;
config_color;
config_contour;
config_vectors;

cd(wd);

%Construct the config structure
s_config = struct(...
            'batim_contour_scale', batim_contour_scale, ...
            'coastline_file', coastline_file, ...
            'save_coastline', save_coastline, ...
            'coastline_res', coastline_res, ...
            'coastline_patch_color', coastline_patch_color, ...
            'plot_color', plot_color, ...
            'colorlimits', colorlimits, ...
            'scalecolor', scalecolor, ...
            'colormap_type', colormap_type, ...
            'colormap_inv', colormap_inv, ...
            'shading_type', shading_type, ...
            'autocolortitle', autocolortitle, ...
            'colorbartitle', colorbartitle,...
            'plot_contour', plot_contour, ...
            'contourlimits', contourlimits, ...
            'autoscale', autoscale, ...
            'contour_scale', contour_scale, ...
            'contour_line_style', contour_line_style, ...
            'contour_colormap_type', contour_colormap_type, ...
            'filetype', filetype, ...
            'matfile', matfile, ...
            'matdims', matdims, ...
            'file', file, ...
            'maskit', maskit, ...
            'projection', projection, ...
            'grid_fontsize', grid_fontsize, ...
            'title_fontsize', title_fontsize, ...
            'override_ll', override_ll, ...
            'lat_lon_override_file', lat_lon_override_file, ...
            'closematlab', closematlab, ...
            'change_miss', change_miss, ...
            'new_miss', new_miss, ...
            'output_format', output_format, ...
            'output_extension', output_extension, ...
            'output_dir', output_dir, ...
            'output_visible', output_visible, ...
            'output_renderer', output_renderer, ...
            'horizontal_scale_x', horizontal_scale_x, ...
            'horizontal_scale_y', horizontal_scale_y, ...
            'horizontal_scale_size', horizontal_scale_size, ...
            'plot_vectors', plot_vectors, ...
            'u_vec', u_vec, ...
            'v_vec', v_vec, ...
            'inc', inc, ...
            'legpos', legpos, ...
            'legcol', legcol, ...
            'legscale', legscale, ...
            'legkey', legkey, ...
            'vec_headlength', vec_headlength, ...
            'vec_headwidth', vec_headwidth, ...
            'vec_shaftwidth', vec_shaftwidth );





